package cn.xiuxius.embedded.command.converter;

import cn.xiuxius.embedded.model.STCType;
import picocli.CommandLine;

public class STCConverter implements CommandLine.ITypeConverter<STCType> {
    @Override
    public STCType convert(String value) {
        try {
            return STCType.from(value.trim().toUpperCase());
        } catch (Exception e) {
            throw new CommandLine.TypeConversionException("Invalid STC: " + value);
        }
    }
}

